home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group92c.txt
/
000031_icon-group-sender _Wed Oct 21 17:54:16 1992.msg
< prev
next >
Wrap
Internet Message Format
|
1993-01-04
|
2KB
Received: by cheltenham.cs.arizona.edu; Thu, 22 Oct 1992 05:59:49 MST
From: mitch@rock.csd.sgi.com
Date: Wed, 21 Oct 92 17:54:16 -0700
Original-From: mitch@rock.csd.sgi.com (Tom Mitchell)
Message-Id: <9210220054.AA02378@rock.csd.sgi.com>
To: nowlin@iwtqg.att.com
Cc: att!cs.arizona.edu!icon-group
In-Reply-To: nowlin@iwtqg.att.com's message of Tue, 20 Oct 92 12:05 CDT <199210201711.AA23991@optima.cs.arizona.edu>
Subject: logging off UNIX
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
From: nowlin@iwtqg.att.com
Date: Tue, 20 Oct 92 12:05 CDT
> You could get around this a) by finding your login shell and then
> killing it manually (a la system("kill -9 "||process_id) where pro-
> cess_id is the ID of your login shell.
I can't take it anymore. One of the first things UNIX novices learn is how
to do a "kill -9". Most haven't a clue what this does but believe me -
it's not a pretty sight.
Yes, this is not a pretty sight. The man page used to
say "kill with extreme prejudice".
On most Unix systems kill and killall send a -9 by default.
This is gross and nasty. Lots of people alias such things
to "kill -HUP $* ; sleep 5; kill $*" to give the poor
process 5 seconds to correctly clean up its TMP files
network connections and so on...
I like to think that the HUP signal is the best thing that
the phone company could do when a phone line hangs up. With
older modems and phone lines -- this was common enough that
older programs do good things in the presence of a HUP
signal.
Too often new programmers omit signal handlers where signals
can be used to turn on debug; exit gracefully; reset strange
states; and so on.
If you have to kill a process use a plain vanilla "kill" first. This uses
the software termination signal (15) to notify the process in question it
should terminate. This signal gives the process being killed a chance to
return any resources it's using and clean up after itself before it dies.
-----
a kinder gentler UNIX.
Jerry Nowlin
Good stuff Jerry... Exactly,